package com.wyw.base.util;

import javax.servlet.http.HttpServletRequest;

import org.springframework.security.core.context.SecurityContextHolder;

import com.wyw.core.secu.dto.UserDetailInfo;

public class WebUtil {
	public static UserDetailInfo getCurrentUserDetail(){
		Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
		UserDetailInfo userDetails=(UserDetailInfo)principal;
		return userDetails;
	}
	
	public static String getSevletContextPath(HttpServletRequest request){
	 return	request.getContextPath();
	}
}
